home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
powerb5.zip
/
P5UTL001.TIP
< prev
next >
Wrap
Text File
|
1993-06-01
|
2KB
|
49 lines
I was tinkering with ANSI.SYS's special escape sequences and
found myself wishing for an easier way to invoke them from a
batch file. After all, ANSI.SYS can do a lot of neat tricks.
For instance, the character sequences Esc[44m and Esc[37m,
where Esc is the escape character (ASCII 27), will change
the colors on the DOS command screen, making the background
blue and the characters white. You can create some
attractive color menus this way.
Unfortunately, special measures are usually required to get
the Esc character into a batch file. To solve this problem,
I wrote a small utility that makes ANSI.SYS functions
available from the DOS command line.
Richard C. Jones
Throop, Pennsylvania
Editor's Note: ESC.COM can be found in the P5UTL directory
on your PowerBase *.* Volume 5 diskette. To use it, copy it
to a directory listed in your PATH command and be sure the
command `DEVICE = C:/DOS/ANSI.SYS' is in your CONFIG.SYS
file. the following table shows a small sampling of things
you can do with this program.
Sample escape sequences using ESC.BAT
Put this in batch... To do this
------------ ------- ----------
ESC 44;37m Make background blue, foreground white
ESC 12;40H Move cursor to row 12, column 40
ESC s Save the cursor position
ESC u Restore the saved cursor position
ESC K Erase to end of current line
ESC 5B Move the cursor down 5 lines
ESC 0;68;"DIR";13p Make the F10 key execute the DIR
command at the DOS prompt
ESC 63;92p These two commands, in succession,
ESC 92;63p swap the backslash and question
mark keys
Title: Escape From DOS
Category: UTL
Issue Date: February, 1992
Editor: Brett Glass
Supplementary Files: P5UTL\ESC.COM
Filename: P5UTL001.TIP